//
//  WSPlayerTool.h
//  RunningMan
//
//  Created by 王帅 on 16/5/23.
//  Copyright © 2016年 WSJ. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
// 协议
@protocol PlayerToolDeletage <NSObject>
// 协议方法
- (void)playMusicCurrenTime:(NSString *)currenTime totalTime:(NSString *)totalTime Progress:(CGFloat)progress;

// 自动播放下一曲
- (void)automaticPlayNextMusic;


@end

@interface WSPlayerTool : NSObject

@property(nonatomic, strong) AVPlayer *player;
@property (nonatomic, assign) id<PlayerToolDeletage> delegate;

// 单例
+(WSPlayerTool *)shareMusic;

// 准备播放, 传一个音乐的URL
- (void)preparePlayMusicWithUrl:(NSString *)url;

// 播放
- (void)playMusic;

// 暂停
- (void)pauseMusic;

// 是否正在播放
- (BOOL)isPlaying;

@end
